<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'International Environment Company - Admin Control Panel',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.vcore.*',
        'application.vcore.auth.*',
        'application.vcore.error.ErrorHandler',
        'application.models.*',
        'application.components.*',
        //Constants
        'application.runtime.cached.*',
        // User
        'application.modules.User.models.*',
        //Helpers
        'application.extensions.helpers.jformvalidate.EHtml',
        'application.extensions.helpers.XInput',
        'application.utilities.AppConstants',
        //Utilities
        'application.utilities.Utility',
	),
    
    'modules' => array(
        'AdminPanel',
        'User',
        'VCore',
        'gii' => array(
            'class' => 'system.gii.GiiModule',
            'password' => 'gii'
        ),
    ),

	// application components
	'components'=>array(
		'errorHandler' => array(
            'class' => 'application.vcore.error.ErrorHandler',
            'errorAction'=>'site/error',
            'mode' => 'production',
        ),
        'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                array(
                    'class'=>'CFileLogRoute',
                    'levels'=>'error, warning, trace',
                ),
            ),
        ),
        'mail'=>array(
            'class' => 'application.extensions.mail.YiiMail',
            'transportType' => 'smtp',
            'viewPath' => 'application.modules.deal.views.mail',
            'transportOptions' => array(
                'host'=>'smtp.gmail.com',
                'username'=>'thelastvampire8387@gmail.com',
                'password'=>'83190087',
                'port'=>465,
                'encryption'=>'ssl',
            ),
        ),
        'user'=>array(
            'class' => 'application.vcore.auth.ApplicationUser',
            // enable cookie-based authentication
            'allowAutoLogin'=>true,
        ),
        //Main DB connection
        'db' => array(
            'connectionString' => 'mysql:host=localhost;port=3306;dbname=sandeal',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
            'enableParamLogging'=>true,
        ),
        'jformvalidate' => array(
            'class' => 'application.extensions.helpers.jformvalidate.EJFValidate'
        ),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>require(dirname(__FILE__).'/params.php'),
);